import { http } from '../request'
const API = import.meta.env.VITE_API_BASE_API || ''
// 计划详情
export const getPlan=async (code:any)=>{
    return http.get<any>(`${API}/client/delivery/plan/${code}`);
}
// 表单提交
export const addForm=async (data:any)=>{
    return http.post<any>(`${API}/client/ad/form/request/addForm`,data);
}
// 微信加V前
export const addWeChatBefore=async (data:any)=>{
    return http.post<any>(`${API}/client/ad/form/request/addWeChatBefore`,data);
}
// 短信验证码
export const sendSmsCode=async (params:any)=>{
    return http.get<any>(`${API}/client/captcha/sms`,params);
}
//获取二维码
export const getQrPick=async (params:any)=>{
    return http.get<any>(`${API}/client/delivery/qr/pick`,params);
}
//加v前登录，获取unionId
export const getUnionId=(params?:any)=>{
  return http.get<any>(`${API}/client/get/userInfo`,params);
}
//加v前登录，获取授权信息
export const getAuthorize=(params?:any)=>{
  return http.get<any>(`${API}/client/serve/authorize`,params);
}
//加v前登录，获取授权信息
export const getUsers=(num:number)=>{
  return http.get<any>(`${API}/client/user/random/${num}`);
}
//问卷详情
export const getQuestion=(id:any)=>{
  return http.get<any>(`${API}/client/user/homework/getHomework/${id}`);
}

// 提交问卷
export const putQuestion=async (data:any)=>{
    return http.post<any>(`${API}/client/user/homework/add`,data);
}